package com.baijia.ticket;

import com.baijia.authentication.Authentication;
import com.baijia.authentication.principal.Service;

/**
 * @title TicketGrantingTicket
 * @desc nothing to say
 * @author caoliang
 * @date 2015年12月5日
 * @version 1.0
 */
public interface TicketGrantingTicket extends Ticket {

    public static final String PREFIX = "TGT";
    public static final String TGTID = "_tgt_id_";
    public static final String TGT_EXPIRED_AT = "_tgt_expired_at_";

    public Authentication getAuthentication();

    public ServiceTicket grantServiceTicket(String id, Service service, boolean credentialsProvided);

    public void expire();

    public boolean isRoot();
}
